<?php
namespace Addons\OaSystem\Model;
//use Think\Model;
use Think\Model\ViewModel;

class OaEmployeeDeptViewModel extends ViewModel{
    public $viewFields = array(
        'OaEmployee'=>array('id','dept_id','name','duty_id'),
        'OaDuty'=>array(
            'level'=>'duty_lvl',
            '_on'=>'OaEmployee.duty_id=OaDuty.id'),
        'OaDept'=>array(
            'name'=>'dept_name',
            'dept_grade_id',
            '_on'=>'OaEmployee.dept_id=OaDept.id'),
        'OaDeptGrade'=>array(
            'value' => 'grade_value',
            'name'=>'grade_name',
            '_on'=>'OaDept.dept_grade_id=OaDeptGrade.id'),

    );
}
?>